﻿    using Seesmic.Sdp.Extensibility;
    using System;
    using System.Runtime.CompilerServices;
    using System.Windows;
namespace Seesmic.HelloTipi
{
    public class TimelineSidebarAction : ISidebarAction
    {
        private string _text;

        protected static readonly string HelloTipiSidebarItemId = "27549DF2-D0AF-4634-85B0-110D09625A4F";

        public virtual void Invoke(SidebarActionContext context)
        {
            //HelloTipiPlugin.LogInfo("context : " + context.ToString());
            
            context.Space.AddTimelineColumn(this, this.Timeline, this.Title, HelloTipiPlugin.AccountIcon);
        }

        public virtual DataTemplate Icon
        {
            get
            {
                return null;
            }
        }

        public bool IsHighlighted
        {
            get
            {
                return false;
            }
        }

        public virtual string PersistId
        {
            get
            {               
                return string.Format("{0}_{1}", HelloTipiSidebarItemId, this.Text.Replace(" ",""));
            }
        }

        public virtual string Text
        {           
            get; set;
        }

        public ITimeline Timeline
        {
            get;
            internal set;
        }

        public virtual string Title
        {
            get;internal set;
        }
    }
}

